import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/base/widget/defult_widget.dart';
import 'package:dmz/business/mine/controller/seting_main_controller.dart';
import 'package:dmz/business/mine/widget/seting_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class SetAboutUsPage extends BaseStatefulWidget<SetingMainController> {
  const SetAboutUsPage({super.key});

  @override
  String titleString() => '关于我们'.tr;

  @override
  get updateId => 'setPhone';

  @override
  bool delectControll() => false;

  @override
  Widget buildContent(BuildContext context) {
    List<String> titles = ['用户注册协议'.tr, '隐私政策'.tr, '服务电话'.tr, '当前版本'.tr];
    List<String> content = ['', '', '0755-26652852', (controller.vison)];
    return Column(children: [
      DefaultText('电摩智'.tr, 36.sp, textColor: const Color(0xFFF9F9F9))
          .marginOnly(bottom: 20.sp),
      Column(
          mainAxisSize: MainAxisSize.min,
          children: List.generate(
              titles.length,
              (index) => SetingWidgets.pageItem(15 + index, titles[index],
                  hitLine: index == 0,
                  hitIcon: index == 3,
                  content: content[index],
                  click: (tag) => controller.pageAction(tag)))),
      const Expanded(child: SizedBox()),
      DefaultText('Copyright 2024电摩智\nAll Rights Reserved', 36.sp,
              textColor: const Color(0xFFF9F9F9), textAlign: TextAlign.center)
          .marginOnly(bottom: 198.sp),
    ]);
  }
}
